// Graph Algorithms#include<stdio.h>int main () {        int city,ways,i,a,b,j,counter = 1;    int array[1001][1001] = {0};    //printf("num of Cities & Ways\n");    scanf("%d %d", &city, &ways);    // How many cities , and ways we have        for (i=0; i<ways ; i++) {        //printf("Ways\n");        scanf("%d %d", &a,&b);        // Between which cities we have a way        array[a][b]=1;        // Make them one so that we can now that        // there is a way between them    }        for (i=0; i<=city; i++)        for (j=0; j<=city; j++)            if (array[i][j]==1){                printf("%d. way -> %d to %d\n" ,counter,i,j);                // Just printing the cities that has way                counter++;            }        }